/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-12-07     Wangjiangbo       the first version
 */

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include "bsp/bsp.h"
#include "mod/mod_filter.h"


typedef enum {
    e_hall_trocar = 0,
    e_hall_arm,
    e_hall_shell,
} hall_index;

typedef enum {
    e_key_drag = 0,
    e_key_err_out,
    e_key_drag_rcm_local,
    e_key_drag_rcm_attitude,
    e_key_en,
    e_key_up,
    e_key_down,
    e_key_left,
    e_key_right,
} key_index;

typedef enum {
    e_sense_left = 0,
    e_sense_right,
    e_sense_top,
    e_sense_bottom,
} sense_index;

typedef struct {
    uint8_t hall_st[3];
    uint8_t key_st[9];
    uint8_t sense_st[4];
    uint8_t fan_pow;

    struct {
        uint8_t style;
        uint8_t freq;

        uint8_t style_backup;
        uint8_t freq_backup;
    } rgb[2];

} iomap;

extern iomap gpio_map;

extern void app_io_init(iomap* map);

#ifdef __cplusplus
}
#endif /* __cplusplus */


